#ifndef FRUIT_H
#define FRUIT_H
#include<QPixmap>
#include <QWidget>
#include<QPainter>
#include"map.h"
#include"basket.h"
#include<QMouseEvent>
#include<QPoint>
#include"littlefruit.h"
#include"stats.h"
#include<QTimer>
static int x1=552*0.5;

static int z=522;
class fruit : public QWidget
{
    Q_OBJECT

public:
    fruit(QWidget *parent = 0);
    ~fruit();
    void initfruit();
    map map2;
    void paintEvent(QPaintEvent *);
    basket bask_k;
    //掉水果
    void fruitshow();
    littlefruit l_fruits[20];
    int l_time2;//掉落间隔
     QTimer l_timer;//构造计时器
     //启动游戏
     void startit();
     void updatepos();
     void shouna();
protected:

    //void mouseReleaseEvent(QMouseEvent *event);
     void mousePressEvent(QMouseEvent *event);
     void mouseMoveEvent(QMouseEvent *event);
private:
     QPoint offset;

};

#endif // FRUIT_H
